import static org.junit.Assert.assertEquals;

import org.junit.Test;
/**
 * @author Sparsh Sharma
 */
public class changeStateTest {
	@Test
	public void testchangeState(){
	Display disp = new Display();
	State title, shop, sailing, pirate;
	Ship ship = new Ship();
	title = new TitleScreen(ship);
    shop = new Shop(ship);
    sailing = new Sailing(ship);
    pirate = new Pirate(ship);
	disp.changeState(title);
	assertEquals(disp.getState().getType(), "TitleScreen");
	disp.changeState(shop);
	assertEquals(disp.getState().getType(), "Shop");
	disp.changeState(sailing);
	assertEquals(disp.getState().getType(), "Sailing");
	disp.changeState(pirate);
	assertEquals(disp.getState().getType(), "Pirate");
	}
}
